package test.exception_hander;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import test.config.ProjectUrlConfig;
import test.exception.SellerAuthorizeException;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : example
 * @ Author: XuLeHuang
 * @ Date: 2022/6/24 17:32
 * @ Description:
 */
@ControllerAdvice
public class SellerExceptionHandler {
    //拦截登录异常信息
    @ExceptionHandler(value = SellerAuthorizeException.class)
    public String handlerSellerAuthorizeException(Model model){
        return "redirect:"
                .concat(ProjectUrlConfig.ANON);
    }
}


